package cn.tqfeiyang.smartadmin.business.organization.mapper;

import cn.tqfeiyang.smartadmin.business.organization.entity.AddressEntity;
import cn.tqfeiyang.smartadmin.business.organization.request.AddressQueryDTO;
import cn.tqfeiyang.smartadmin.business.organization.response.AddressDetailVO;
import cn.tqfeiyang.smartadmin.business.organization.response.AddressQueryVO;
import cn.tqfeiyang.smartadmin.commons.mybatis.MPBaseMapper;
import cn.tqfeiyang.smartadmin.commons.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 地址映射接口
 *
 * @author tqfeiyang
 * @since 2024-10-18
 */
@Mapper
public interface AddressMapper extends MPBaseMapper<AddressEntity> {

    /**
     * 查询地址列表
     *
     * @param dto 请求数据
     * @return 地址列表
     */
    List<AddressQueryVO> queryAddresses(@Param(Constants.DTO) AddressQueryDTO dto);

    /**
     * 查询地址详情
     *
     * @param addressId 地址id
     * @return 地址详情
     */
    AddressDetailVO readAddress(Long addressId);

    /**
     * 删除地址实体
     *
     * @param addressId 地址id
     */
    void deleteAddress(Long addressId);

}
